package com.you.swagger;

import com.you.swagger.controller.IUserInterface;
import com.you.swagger.controller.UserInterfaceImpl;
import com.you.swagger.controller.UserInterfaceImplDump;
import com.you.swagger.service.IUserService;
import com.you.swagger.service.impl.IUserServiceImpl;
import com.you.swagger.util.MyClassLoader;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
public class SpringbootSwaggerDemoApp {

    public static void main(String[] args) throws  Exception{
        ConfigurableApplicationContext context = SpringApplication.run(SpringbootSwaggerDemoApp.class, args);
//        IUserService userService = context.getBean(IUserService.class);
//        System.out.println(userService.findUserInfoByUserId("1"));
//        System.out.println(context.getBean("userInterfaceImpl"));
        //加载字节码文件
//        MyClassLoader myClassLoader = new MyClassLoader();
//        Class<?> clazz = myClassLoader.defineClass("UserInterfaceImplDump",
//                UserInterfaceImplDump.dump());
//        System.out.println(clazz.getSimpleName());
    }
}
